<div class="modal-header">
    <button type="button" class="close" ng-click="cancel()">×</button>
   <!--  <i class="fa fa-inbox"></i> -->
    <span class="label label-tag label-primary">新建知识库</span>
</div>
<div class="modal-body">
    <input type="hidden" name="createrUserId" ng-model="createSolution.createrUserId">
    <input type="hidden" name="relateId" ng-model="createSolution.relateId" value="0">  
    <input type="hidden" name="vision"  ng-model="createSolution.vision" value="1">  
    <input type="hidden" name="status" ng-model="createSolution.status" value="1"> 

    <div class="row form-group" ng-class="{'has-error': showError('title')}">
            <label class="col-md-2 control-label" for="title">
                    标题:
            </label>
            <div class="col-md-9">
                <input  id="title" name="title" ng-model="createSolution.title" class="form-control"  placeholder="标题" />
            </div>
    </div>

    <div class="row form-group" ng-class="{'has-error': showError('keys')}">
         <label class="col-md-2 control-label" for="keys">关键字:</label>
         <div class="col-md-9">
               <input  class="form-control" id="keys" name="keywords" ng-model="createSolution.keys" class="form-control"  placeholder="关键字" />
         </div> 
    </div>

    <div class="row form-group" ng-class="{'has-error': showError('typeId')}">
        <label class="col-md-2 control-label" for="type">分类:</label>
        <div class="col-md-9">
            <div class="form-group">
                <div class="input-group">
                  <input type="text" class="form-control" ng-model="createSolution.typeName" placeholder="分类..."/>
                  <span class="input-group-btn">
                    <button type="button" class="btn btn-warning" ng-click="chooseknowledge()" >
                      <i class="fa fa-search"></i>  
                    </button></span>
                </div>
            </div>
            <input type="hidden" id="typeid" name="typeId"   ng-model="createSolution.typeId"/>
            <!-- <div class="form-group">
                <div class="input-group">
                  <input type="text" class="form-control" name="masked" placeholder="分类" ng-model="createSolution.typeName">
                  <span class="input-group-btn">
                    <button type="button" class="btn btn-primary" ng-click="chooseknowledge()">
                      选择
                    </button> </span>
                  <input type="hidden" id="typeid" name="typeId" ng-model="createSolution.typeId">
                </div>
            </div> -->
            <div class="panel panel-white" id="panel5" ng-if="showknowledgeType"  >
                
              <div class="panel-heading">
                <button type="button" style="margin-left:94%" ng-click="close()">×</button>
                <h4 class="panel-title">知识库分类</h4>
                <!-- <ct-paneltool class="panel-tools" tool-collapse="tool-collapse"></ct-paneltool> -->
              </div>
              <div class="panel-wrapper"> <!--collapse="panel5" ng-init="panel5=false" -->
                <div class="panel-body">
                  <abn-tree tree-data="data" tree-control="create_tree" on-select="tree_handler(branch)" icon-leaf="ti-file" icon-expand="ti-plus" icon-collapse="ti-minus" ></abn-tree>
                </div>
              </div>
            </div>
        </div> 
    </div>

    <div class="row form-group" ng-class="{'has-error': showError('range')}">
         <label class="col-md-2 control-label" for="range">使用范围:</label>
         <div class="col-md-9">
            <ui-select ng-model="createSolution.range" theme="bootstrap">
                <ui-select-match placeholder="选择使用范围">
                      {{$select.selected.name}}
                </ui-select-match>
                <ui-select-choices repeat="item in ranges | filter: $select.search">
                      <div ng-bind-html="item.name | highlight: $select.search"></div>
                      <!-- <small ng-bind-html="item.id | highlight: $select.search"></small> -->
                </ui-select-choices>
            </ui-select>
             
        </div> 
    </div>
         
    <div class="row form-group" ng-class="{'has-error': showError('number')}">
            <label class="col-md-2 control-label" for="number">知识库编号:</label>
            <div class="col-md-9" style="z-indx:1px;">
              <input  id="number" ng-model="createSolution.number" name="solutionNumber" class="form-control"  placeholder="知识库编号" editabled="false"> 
            </div>             
    </div>
    
   <div class="row form-group" ng-class="{'has-error': showError('content')}">
            <label class="col-md-2 control-label" for="content">知识库内容:</label>
            <div class="col-md-9" style="z-indx:1px;" >
                <div ckeditor="options" ng-model="createSolution.content" ready="onReady()"></div>
                <!-- <div class="well margin-top-20">
                  {{content}}
                </div> -->
            </div>             
    </div>
    
    <div class="row form-group" ng-class="{'has-error': showError('file')}">
        <div class="col-md-2">
           <div class="checkbox clip-check check-primary checkbox-inline">
                  <input type="checkbox" id="checkbox10" ng-model="hasAttachment">
                  <label for="checkbox10">
                    附件
                  </label>
           </div> 
        </div>
        <div class="col-md-9" ng-if="hasAttachment"><!--ng-if="hasAttachment"-->
            <span class="dz-text-small">提示：上传txt文档以及Office文档不能超过10M,其他文档不能超过200M</span>
            <div class="panel panel-white">
              <div class="panel-body">
                <div class="row">
                  <!-- <div class="col-md-6" ng-show="uploader.isHTML5">
                    < 3. nv-file-over uploader="link" over-class="className" >
                    <div class="well my-drop-zone" nv-file-over="" name="fileContent" uploader="uploader" over-class="className">
                      拖动文件到这儿
                    </div>
                  </div> -->
                  <div class="col-md-6">
                    <span class="btn btn-primary btn-o btn-file"> 上传文件
                      <input name="uploadedFile" type="file" nv-file-select="" uploader="uploader" />
                    </span>
                  </div>
                </div>
                <div class="row">
                  <div ng-repeat="item in uploader.queue">
                    <span class="dz-text-small"> 上传的文件: <strong>{{item.file.name }}</strong> </span>
                  </div>
                </div>
              </div>
            </div>
          <!--div class="col-md-9" style="margin-bottom: 40px">
            <h4>上传队列</h4>
            <div class="panel panel-transparent">
              <div class="panel-body">
                <p>
                  Queue length: {{ uploader.queue.length }}
                </p>
                <div class="table-responsive">
                  <table class="table">
                    <thead>
                      <tr>
                        <th width="50%">Name</th>
                        <th ng-show="uploader.isHTML5">Size</th>
                        <th ng-show="uploader.isHTML5">Progress</th>
                        <th>Status</th>
                        <th>Actions</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr ng-repeat="item in uploader.queue">
                        <td><strong>{{ item.file.name }}</strong></td>
                        <td ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>
                        <td ng-show="uploader.isHTML5">
                        <div class="progress progress-xs margin-bottom-0">
                          <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                        </div></td>
                        <td class="text-center"><span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span><span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span><span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span></td>
                        <td nowrap>
                        <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" ng-disabled="item.isReady || item.isUploading || item.isSuccess">
                          <span class="glyphicon glyphicon-upload"></span> Upload
                        </button>
                        <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" ng-disabled="!item.isUploading">
                          <span class="glyphicon glyphicon-ban-circle"></span> Cancel
                        </button>
                        <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                          <span class="glyphicon glyphicon-trash"></span> Remove
                        </button></td>
                      </tr>
                    </tbody>
                  </table>
                </div>
                <div>
                  <div>
                    Queue progress:
                    <div class="progress progress-xs margin-top-5 margin-bottom-20">
                      <div class="progress-bar" role="progressbar" ng-style="{ 'width': uploader.progress + '%' }"></div>
                    </div>
                  </div>
                  <button type="button" class="btn btn-primary btn-s" ng-click="uploader.uploadAll()" ng-disabled="!uploader.getNotUploadedItems().length">
                    <span class="glyphicon glyphicon-upload"></span> Upload all
                  </button>
                  <button type="button" class="btn btn-primary btn-o  btn-s" ng-click="uploader.cancelAll()" ng-disabled="!uploader.isUploading">
                    <span class="glyphicon glyphicon-ban-circle"></span> Cancel all
                  </button>
                  <button type="button" class="btn btn-primary btn-o btn-s" ng-click="uploader.clearQueue()" ng-disabled="!uploader.queue.length">
                    <span class="glyphicon glyphicon-trash"></span> Remove all
                  </button>
                </div>
              </div>
            </div>
          </div-->
        </div>
   </div>
</div>  
<div class="modal-footer">
  <button class="btn btn-primary" ng-click="ok()" translate="modal.button.OK">OK</button>
  <button class="btn btn-primary btn-o" ng-click="cancel()" translate="modal.button.CANCEL">Cancel</button>
</div>